{php include wl_template('common/header');}
<ul class="nav nav-tabs">
    <li class="active"><a href="javascript:;">商户红包列表</a></li>
</ul>
<div class="app-content">
    <div class="app-filter">
        <div class="filter-action">
            <a href="{php echo web_url('store/comment/redpackAdd')}" class="btn btn-primary">添加红包</a>
        </div>
        <div class="filter-list">
            <form class="form-horizontal" action="" method="post">
                <div class="form-group">
                    <div class="col-sm-2 control-label">红包名称</div>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" name="title" value="{$title}" placeholder="请输入红包活动标题...">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label"></div>
                    <div class="col-sm-6">
                        <button class="btn btn-primary" type="submit">搜索</button>
                        <a href="{php echo web_url('store/comment/redpackList')}" class="btn btn-danger">清除</a>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <div class="app-table-list">
        <div class="panel panel-default">
            <div class="table-responsive">
                <table class="table table-hover">
                    <thead>
                    <tr>
                        <th class="text-center" width="5%">ID</th>
                        <th class="text-center" width="10%">标题</th>
                        <th class="text-center" width="10%">使用页面</th>
                        <th class="text-center" width="10%">领取金额</th>
						<th class="text-center" width="20%">分享详情</th>
                        <th class="text-center" width="10%">状态</th>
                        <th class="text-center" width="15%">创建时间</th>
                        <th class="text-center" width="20%">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {loop $list $item}
                        <tr class="text-center">
                            <td>{$item['id']}</td>
                            <td>{$item['title']}</td>
                            <td>
                                <label class="label label-primary">{$item['name']}</label>
                            </td>
                            <td>
								<label class="label label-danger">￥{$item['onemoney']}</label><br/>
                            </td>
							<td>
								{loop  $item['sharemoneys'] $share}
								分享<label class="label label-info">{$share['usernum']}</label>人领取<label class="label label-warning">￥{$share['money']}</label><br/>
								{/loop}
							</td>
                            <td>
                            	{if $item['status'] == 1}<label class="label label-success">启用</label>{/if}
                            	{if $item['status'] != 1}<label class="label label-danger">禁用</label>{/if}
                            </td>
                            <td>{php echo date("Y-m-d H:i:s",$item['createtime']);}</td>
                        
                            <td>
                                <a class="btn btn-sm btn-primary" href="{php echo web_url('store/comment/redpackAdd',['id'=>$item['id']])}">编辑</a>
                                <a class="btn btn-sm btn-warning" href="{php echo web_url('agentset/diyForm/record',['id'=>$item['id']])}">表单</a>
                                <a class="btn btn-sm btn-info" href="{php echo web_url('agentset/diyForm/record',['id'=>$item['id']])}">记录</a>
                                <a class="btn btn-sm btn-danger" data-toggle="ajaxRemove" href="{php echo web_url('store/comment/redpackDel',['id'=>$item['id']])}" data-confirm="确定删除当前活动?">删除</a>
                            </td>
                        </tr>
                    {/loop}
                    </tbody>
                </table>
            </div>
            <div class="app-table-foot clearfix margin-t-20">
                <div class="pull-left"></div>
                <div class="pull-right">{$pager}</div>
            </div>
        </div>
    </div>
</div>
{php include wl_template('common/footer');}